package com.howard.base.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

/**
 * 文件过大时的异常处理拦截器
 *
 * @author 程进之
 * @since JDK1.6
 * @history 2012-10-15 程进之 新建
 */
public class PreResultListenerInterceptor extends AbstractInterceptor {

    @Override
    public String intercept(ActionInvocation invocation) throws Exception {
        // 文件上传过大拦截器  返回result之前判断
        invocation.addPreResultListener(new FileTooLargeListener());
        return invocation.invoke();
    }
}
